#ifndef VECTOR_H
#define VECTOR_H


#include "Matrix.h"

class Matrix;
class Vector2
{
public:
	Vector2();
	Vector2(int v);
	Vector2(float v);
	Vector2(int x,int y);
	Vector2(float x,float y);
	float X;
	float Y;
	float Length();
	float LengthSquared();

	
	Vector2 operator+ (Vector2 vec);
	Vector2 operator- (Vector2 vec);
	Vector2 operator* (Vector2 vec);
	Vector2 operator/ (Vector2 vec);
	Vector2 operator* (float value);
	Vector2 operator/ (float value);
	Vector2 operator* (int value);
	Vector2 operator/ (int value);

	static Vector2 One;
	static Vector2 Zero;
	static Vector2 UnitX;
	static Vector2 UnitY;

	static float Dot(Vector2 vecA,Vector2 vecD);
	static Vector2 Lerp(Vector2 vecA,Vector2 vecB,float value);
	static Vector2 Normalize(Vector2 vec);
	static Vector2 CircleToCartesian(float angle, float distance);
	static Vector2 Clamp(Vector2 vec,Vector2 max,Vector2 min);
};
class Vector3
{
public:
	Vector3();
	Vector3(int v);
	Vector3(float v);
	Vector3(int x,int y,int z);
	Vector3(float x,float y,float z);
	Vector3(Vector2 vec2,float z);
	float X;
	float Y;
	float Z;
	float Length();
	float LengthSquared();

	
	Vector3 operator+ (Vector3 vec);
	Vector3 operator- (Vector3 vec);
	Vector3 operator* (Vector3 vec);
	Vector3 operator/ (Vector3 vec);
	Vector3 operator* (float value);
	Vector3 operator/ (float value);
	Vector3 operator* (int value);
	Vector3 operator/ (int value);

	static Vector3 One;
	static Vector3 Zero;
	static Vector3 Up;
	static Vector3 Down;
	static Vector3 Left;
	static Vector3 Right;
	static Vector3 Forward;
	static Vector3 Backward;

	static float Dot(Vector3 vecA,Vector3 vecD);
	static Vector3 Transform(Vector3 vec, Matrix matrix);
	static Vector3 Cross(Vector3 vecA,Vector3 vecD);
	static Vector3 Lerp(Vector3 vecA,Vector3 vecB,float value);
	static Vector3 Normalize(Vector3 vec);
	static Vector3 SphereToCartesian(float angleA,float angleB,float distance);
	static Vector3 Clamp(Vector3 vec,Vector3 max,Vector3 min);
};
#endif